
include(ExternalProject)

if (ENABLE_NNDEPLOY_INFERENCE_TVM STREQUAL "OFF")
elseif (ENABLE_NNDEPLOY_INFERENCE_TVM STREQUAL "ON")
else()
  include_directories(${ENABLE_NNDEPLOY_INFERENCE_TVM}/include)
  include_directories(${ENABLE_NNDEPLOY_INFERENCE_TVM}/3rdparty/cnpy)
  include_directories(${ENABLE_NNDEPLOY_INFERENCE_TVM}/3rdparty/dlpack/include)
  include_directories(${ENABLE_NNDEPLOY_INFERENCE_TVM}/3rdparty/dmlc-core/include)

  set(LIB_PATH ${ENABLE_NNDEPLOY_INFERENCE_TVM}/lib)
  set(LIBS "tvm")
  foreach(LIB ${LIBS})
    set(LIB_NAME ${NNDEPLOY_LIB_PREFIX}${LIB}${NNDEPLOY_LIB_SUFFIX})
    set(FULL_LIB_NAME ${LIB_PATH}/${LIB_NAME})
    set(NNDEPLOY_THIRD_PARTY_LIBRARY ${NNDEPLOY_THIRD_PARTY_LIBRARY} ${FULL_LIB_NAME})
  endforeach()
  file(GLOB_RECURSE INSTALL_LIBS "${LIB_PATH}/*")
  foreach(INSTALL_LIB ${INSTALL_LIBS})
    install(FILES ${INSTALL_LIB} DESTINATION ${NNDEPLOY_INSTALL_LIB_PATH})
  endforeach()
endif()